<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

		<!-- Metas -->
		<title>curtains.js | Asynchronous textures example</title>
	    <meta name="description" content="Load WebGL textures asynchronously onto a plane and display it with curtains.js">
	    <link rel="canonical" href="https://www.curtainsjs.com/examples/asynchronous-textures/index.html">

	    <!-- Facebook OG -->
	    <meta property="og:title" content="curtains.js | Asynchronous textures example">
	    <meta property="og:type" content="website">
	    <meta property="og:description" content="Load WebGL textures asynchronously onto a plane and display it with curtains.js">
	    <meta property="og:url" content="https://www.curtainsjs.com/examples/asynchronous-textures/index.html">
	    <meta property="og:image" content="https://www.curtainsjs.com/images/curtains-js-logo.jpg">

	    <!-- Twitter card -->
	    <meta name="twitter:card" content="summary_large_image">
	    <meta name="twitter:site" content="@martinlaxenaire">
		<meta name="twitter:creator" content="@martinlaxenaire">
		<meta name="twitter:title" content="curtains.js | Asynchronous textures example">
		<meta name="twitter:description" content="Load WebGL textures asynchronously onto a plane and display it with curtains.js">
		<meta name="twitter:image" content="https://www.curtainsjs.com/images/curtains-js-logo.jpg">

		<!-- Favicon -->
		<link rel="apple-touch-icon" sizes="180x180" href="../../images/favicons/apple-touch-icon.png">
		<link rel="icon" type="image/png" sizes="32x32" href="../../images/favicons/favicon-32x32.png">
		<link rel="icon" type="image/png" sizes="16x16" href="../../images/favicons/favicon-16x16.png">
		<link rel="manifest" href="../../images/favicons/site.webmanifest">
		<link rel="mask-icon" href="../../images/favicons/safari-pinned-tab.svg" color="#202340">
		<link rel="shortcut icon" href="../../images/favicons/favicon.ico">
		<meta name="msapplication-TileColor" content="#202340">
		<meta name="msapplication-config" content="../../images/favicons/browserconfig.xml">
		<meta name="theme-color" content="#202340">

		<link href="https://fonts.googleapis.com/css?family=PT+Sans:400" rel="stylesheet">
		<link rel="stylesheet" href="style.css" type="text/css">
	</head>
	<body>
        <div id="page-wrap">

			<div id="canvas"></div>

			<a href="https://www.curtainsjs.com/" title="back to curtains.js website" id="back-to-lib-link" target="_blank">back to curtains.js website</a>

            <a href="https://github.com/martinlaxenaire/curtainsjs/blob/master/examples/asynchronous-textures/js/async.textures.setup.js" title="Show source code" id="source-code-link" target="_blank">&lt;/ &gt;</a>

			<div id="content">
				<!-- notice this plane does not contain any image -->
				<div class="flex-wrapper async-textures">
					<span>Click me !</span>
				</div>
			</div>


			<div id="async-textures-wrapper">
				<!-- we will use those images as textures -->
                <div class="image-wrapper">
                    <img src="../medias/plane-texture-1.jpg" crossorigin="" data-sampler="firstTexture" />
                </div>
                <div class="image-wrapper">
				    <img src="../medias/plane-texture-2.jpg" crossorigin="" data-sampler="secondTexture" />
                </div>
			</div>


			<div id="load-images-wrapper" class="flex-wrapper">
				<span id="load-images">Click to load plane images and render it</span>
			</div>

		</div>


        <script src="js/async.textures.setup.js" type="module"></script>

		<!-- Global site tag (gtag.js) - Google Analytics -->
		<script async src="https://www.googletagmanager.com/gtag/js?id=UA-141413267-1"></script>
		<script>
		  	window.dataLayer = window.dataLayer || [];
		  	function gtag(){dataLayer.push(arguments);}
		  	gtag('js', new Date());

		  	gtag('config', 'UA-141413267-1');
		</script>

	</body>
</html>
